<?php

namespace app\base\controller\api;

use think\admin\Controller;
use app\base\model\AiApiConfig;
use app\base\model\AiModelWord;
use app\base\controller\api\Auth;


/**
 * 模型提示词配置
 * Class Login
 * @package app\store\controller
 */
class ModelWord extends Auth
{
    //获取提示词列表
    public function getList()
    {
        $list = AiModelWord::mQuery()->where(['user_id'=>$this->user_id])->equal('type')->order('id desc')->select()->toArray();
        $this->success('获取成功', $list);

    }
    //保存提示词
    public function saveData()
    {
        $data = $this->app->request->post();
        $data['user_id'] = $this->user_id;
        AiModelWord::mQuery()->save($data);
        $this->success('保存成功');
    }

    //获取提示词详情
    public function getInfo()
    {
        $data = AiModelWord::mk()->find(input('id'));
        $this->success('获取成功', $data);
    }

}
